package com.zenghm.recyclerview.expandable;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.zenghm.recyclerview.databinding.ActivityRecyclerviewBinding;

public class ExpandableRecyclerViewActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final Context context = this;
        ActivityRecyclerviewBinding binding = ActivityRecyclerviewBinding.inflate(LayoutInflater.from(context));
        setContentView(binding.getRoot());

        ExpandableRecyclerViewAdapter mAdapter = new ExpandableRecyclerViewAdapter();
        final RecyclerView recyclerView = binding.recyclerview;
        recyclerView.setLayoutManager(new LinearLayoutManager(context, RecyclerView.VERTICAL, false));
        recyclerView.setAdapter(mAdapter);
    }

}
